use clap::Parser;

mod cli;
mod algorithm;
mod printer;

fn main() {
    //Parse CLI Flags
    let flags: cli::Cli = cli::Cli::parse();
    //Execute Algorithm
    let matches = match algorithm::search(flags){
        Ok(matches) => matches,
        Err(err) => {
            println!("Program execution error = {}",err);
            return;
        }
    };
    //Print matches
    printer::print_matches(matches);
}
